class AddLocation < ActiveRecord::Migration
  def self.up
    add_column :data_objects, :location_id, :integer, :null => false
    execute "alter table data_objects add constraint fk_data_object_locations foreign key (location_id) references locations(id)"
  end



  def self.down
    execute "alter table data_objects drop foreign key fk_data_object_locations"
    remove_column :data_objects, :location_id
  end
  #if location_id is taken away, will the foreign key constraint be moot, or will I need to undo it?
end
